package top.lyunz.lucky.hr.controller;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import top.lyunz.lucky.hr.bean.engageResume;
import top.lyunz.lucky.hr.service.engageResumeService;

@Controller
public class engageResumeController {
	@Autowired
	private engageResumeService engageResumeService;
	@RequestMapping("/engageResumeAdd")
	public String engageResumeAdd(engageResume e,HttpServletResponse response) throws IOException {
		if(!engageResumeService.engageResumeAdd(e)) {
			PrintWriter writer = response.getWriter();
			writer.print("<script type='text/javascript'>alert('添加失败，请联系站内管理员！');location.href('/recruit/toresumeRegister');</script>");
		}
		return "";
		
	}
	
}
